

import javax.swing.*;

public class PictureFrame extends JFrame


{
	
	public JLabel pictureLabel;
	public JScrollPane scroll;
	
	
	public int height;
	public int width;

	public ImageIcon image;
	public byte[] filebytes;
	
	
	
	public PictureFrame(byte[] filebytes, int width, int height)
	{
	
		this.filebytes = filebytes;
		image = new ImageIcon(filebytes);
		this.height = height;
		this.width = width;
		
		setSize(width, height);
		setTitle("--- [  Picture Frame!  ] ---");
		setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		
		
		
		setVisible(true);
		
		
		buildUI();
	}
	
	public void buildUI()
	{
		pictureLabel = new JLabel(image);
		getContentPane().add(pictureLabel);
		scroll = new JScrollPane(pictureLabel);
		getContentPane().add(scroll);
		
		
		
		
		setVisible(true);
		
	}
	

}

